package com.mimosa.common.customer;

import java.util.Collections;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.mimosa.common.entity.BaseEntity;

@Entity
@Table(name = "T_Customer")
public class TCustomer extends BaseEntity {

	@SuppressWarnings("unchecked")
	@OneToMany(cascade = { javax.persistence.CascadeType.ALL }, mappedBy = "customer")
	private List<TCustomerContact> contactList = Collections.EMPTY_LIST;

	@SuppressWarnings("unchecked")
	@OneToMany(cascade = { javax.persistence.CascadeType.ALL }, mappedBy = "customer")
	private List<TCustomerAddress> addressList = Collections.EMPTY_LIST;

	public List<TCustomerContact> getContactList() {
		return this.contactList;
	}

	public void setContactList(List<TCustomerContact> contactList) {
		this.contactList = contactList;
	}

	public List<TCustomerAddress> getAddressList() {
		return this.addressList;
	}

	public void setAddressList(List<TCustomerAddress> addressList) {
		this.addressList = addressList;
	}
}
